Replacing a function

I would like to replace the "Configure" button on the E-Signatures for a baseline. I am trying to make it so that standard users would just click the button and the setting that we choose would be configured automatically. I found the include file that I need to replace however it happens to be one that is loaded when DOORS starts, so I have to replace the functions that were in the old "signatures.inc". When I replace this file I get an error for each of the functions that were in the out-of-the-box version of the file. I can replace these in my new file however I get "incorrect arguments for function" because I do not know what types of variables are being passed into these functions.

Does anyone have any way that I can either determine the types of arguments I need for these functions, or does anyone know if there is a generic data type that I can use so I can at least determine how many arguments the functions require?

I am also open to other suggestions for how to override the Configure button.

Thanks in advance!
-Steve Valliere
StephenValliere - Thu Feb 16 10:11:05 EST 2012

Re: Replacing a function
Mathias Mamsch - Mon Feb 20 12:27:51 EST 2012

Hi Stephen,

which DOORS Version are you using?

There is different ways of making a modification like this. An intrusive and a non-intrusive. For the non-intrucive you would have to 'hook' into the DOORS gui functions, to intercept the button press (which would probably be a pretty bad hack). The intrusive would be to replace the encrypted file by custom one, but that is complicated, since the include is build like this:

...
void sigSelectCB(DBE, int)
...
void doManageSignatures(Module, Baseline, bool)
...

 


which means that the doManageSignatures(...) creates the dialog and will reference the callbacks for button presses, etc. That means you would have to place your own include file after signatures.inc which will need to reimplement the whole doManageSignatures function to override the old behaviour. Did you actually consider, that someone or IBM could just decrypt the file for you, so you can do your adjustments?

Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS